@extends('dashboard.base')

@section('content')
<div class="container-fluid">
	<div class="row">
		<div class="col">
			<div class="card">
          <div class="card-header"><strong>添加分类</strong></div>
          <div class="card-body">
            <form class="form-horizontal" action="{{ empty($data)? route('admin.bottomnav.store'):route('admin.categories.update', $data) }}" method="post">
              @include('dashboard.includes.topcategory_select', ['name' => 'pid', 'label' => '上级分类', 'default' => $data->pid??''])
              @text(['name' => 'name', 'label' => '分类名称', 'default' => $data->name??'']) @endtext
              @upload(['name' => 'icon', 'label' => '图标', 'default' => $data->icon??'']) @endupload
              @text(['name' => 'sort', 'label' => '排序', 'default' => $data->sort??''])@endtext
                @if(!empty($data))
  		            @method('PUT')
                @endif
              @submit @endsubmit  
              @errmsg
              @enderrmsg
          </form>
        </div>
		</div>
	</div>
</div>	
@endsection